package org.frog.sgs.io;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

/**
 * @author duanxiangqi
 * @date 2012-10-22
 */
public class SgsCodecFactory implements ProtocolCodecFactory {

	private ProtocolDecoder decoder = new SgsProtocolDecoder();

	private ProtocolEncoder encoder = new SgsProtocolEncoder();

	public ProtocolDecoder getDecoder(IoSession session) throws Exception {
		return decoder;
	}

	public ProtocolEncoder getEncoder(IoSession session) throws Exception {
		return encoder;
	}
}